<template>
  <div>
    <div class="scroll-wrap" :class="{ large: needReview }">
      <img
        src="https://akk.028wkf.cn/kdb-weapp-img/new-open-shop/chenggong@3x.png"
        alt="logo"
        class="logo"
      />
      <p class="success">{{ needReview ? '提交' : '开店' }}成功</p>
      <p v-show="needReview" class="tip">平台审核需1~3个工作日，请耐心等待</p>
    </div>
    <div v-show="!needReview" class="console-info">
      <!-- <p class="info-row">
        <span class="label">店铺登录链接</span>
        <span class="value">{{ consoleInfo.url }}</span>
      </p>
      <p class="info-row">
        <span class="label">登录账号</span>
        <span class="value">{{ consoleInfo.cellphone }}</span>
      </p>
      <p class="info-row">
        <span class="label">初始登录密码</span>
        <span class="value">{{ consoleInfo.pwd }}</span>
      </p>-->
    </div>
    <!-- <div class="linkXcxClikc" @click="linkXcxClikc">点击进入开店宝</div> -->
    <button class="btn-action-red" @click="next">完成</button>
  </div>
</template>

<script>
import { getCurrentPageParams } from '@/utils'
export default {
  data () {
    return {
      needReview: true
    }
  },
  computed: {},
  onShow () {
    if (getCurrentPageParams('isFreeTrial' === 'Y')) {
      this.needReview = false
    } else {
      this.needReview = true
    }
  },
  methods: {
    linkXcxClikc () {
      wx.navigateToMiniProgram({
        appId: 'wx0cb53d81f0c7b0cf',
        path: 'pages/home/guidance/main',
        envVersion: 'release',
        success (res) {
          console.log(res)
        }
      })
    },
    next () {
      const vm = this
      let customerId = vm.$cookie.get('account').customerId
      let mobile = vm.$cookie.get('account').phone
      vm.$router.new(
        `/pages/new-open-shop/index/main?customerId=${customerId}&mobile=${mobile}&LinkIdentity='UPGRADE'`
      )
    }
  }
}
</script>

<style lang="scss" scoped>
.scroll-wrap {
  text-align: center;
  &.large {
    height: calc(80vh - 100px);
    > .logo {
      margin-top: 120px;
    }
  }
  > .logo {
    width: 80px;
    height: 80px;
    margin: 90px 0 15px;
  }
  > .success {
    font-size: 18px;
    margin-bottom: 10px;
  }
  > .tip {
    font-size: 14px;
    color: #c4c4c4;
  }
}
.console-info {
  padding: 0 15px;
  margin: 15px 0;
  > .info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 15px;
    font-size: 14px;
    border-bottom: 1px solid #ececec;
    > .label {
      width: 100px;
    }
    > .value {
      max-width: calc(100% - 140px);
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
  }
}
.linkXcxClikc {
  padding: 20px;
  text-align: right;
  font-size: 14px;
  color: #ee6c81;
}
</style>
